<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use common\models\Type;
use common\models\Enclosure;
/* @var $this yii\web\View */
/* @var $model common\models\Article */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="article-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'xa_t_id')->dropDownList(ArrayHelper::map(Type::find()->asArray()->all(),'id','xa_name')) ?>

    <?= $form->field($model, 'xa_title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_abstract')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_title_picture')->fileInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_content')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'xa_content')->widget('kucha\ueditor\UEditor',[]) ?>

    <?= $form->field($model, 'xa_author')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_type')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_keywords')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_description')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_souch')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_auditing')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_state')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_status')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_operation')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_headlines')->radioList(['0'=>'是','1'=>'否']) ?>

    <?= $form->field($model, 'xa_top')->radioList(['0'=>'是','1'=>'否'])?>

    <?= $form->field($model, 'xa_recommend')->dropDownList(['0'=>'一级推荐','1'=>'二级推荐','2'=>'三级推荐']) ?>

    <?//= $form->field($model, 'xa_c_id')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_browse')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_thumbs')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_enclosure_id')->dropDownList(ArrayHelper::map(Enclosure::find()->asArray()->all(),'id','xa_title')) ?>

    <?//= $form->field($model, 'xa_create_time')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_update_time')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_remark')->textInput(['maxlength' => true]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
